<template>
  <div class="home">
    <div class="topNav">
      <span>个人主页</span>
      <div class="info">
        <span>基本信息</span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
      </div>
    </div>
    <div class="toWorkSpace" @click="navToWorkSpace">
      <span>前往控制台</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeView",
  components: {},
  data() {
    return {};
  },
  methods: {
    navToWorkSpace() {
      let loginState = this.$store.state.loginStatus;
      if (loginState == 0) {
        this.$router.push("/login");
      } else {
        this.$router.push("/workSpace");
      }
    },
  },
};
</script>
<style scoped>
.home {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: skyblue;
}
.topNav {
  width: 100%;
  height: 72px;
  min-width: 900px;
  padding: 16px 80px;
  box-sizing: border-box;
  line-height: 40px;
  background-color: white;
}
.topNav > span {
  float: left;
}
.info {
  float: left;
  margin-left: 240px;
}
.toWorkSpace {
  position: absolute;
  right: 80px;
  top: 112px;
  width: 138px;
  height: 40px;
  line-height: 40px;
  border: 1px solid #e5e5e5;
  background-color: white;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 6px 0px,
    rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
}
</style>
